home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 1
/
BUGCD1996_0708.ISO
/
pc
/
util
/
minilin
/
minilin.exe
/
VAR
/
ADM
/
SETUP
/
SETUP_CD.{__
< prev
next >
Wrap
Text File
|
1994-03-16
|
3KB
|
127 lines
#!/bin/sh
if [ -r /tmp/SeTcolor -o "$COLOR" = "on" ]; then
T_PX="`cat /tmp/SeTT_PX`"
if [ -r /tmp/SeTCDdev ]; then
( cd $T_PX/dev ; ln -sf `cat /tmp/SeTCDdev` cdrom )
exit
fi
dialog --title "CONFIGURE CD-ROM?" --yesno "\n Do you have a CD-ROM?" 7 35
if [ $? = 1 -o $? = 255 ]; then
exit
fi
rm -f /tmp/SeTmount /tmp/SeTDS /tmp/SeTCDdev
dialog --title "Configuring CD-ROM link (/dev/cdrom)" \
--menu "\nWhat type of CD-ROM drive do you have?\n" 14 66 5 \
"1" "SCSI [ /dev/sr0, /dev/sr1, /dev/scd0, or /dev/scd1 ]" \
"2" "Sony CDU31A [ /dev/cdu31a ]" \
"3" "Sony 535 [ /dev/sonycd ]" \
"4" "Mitsumi [ /dev/mcd ]" \
"5" "Sound Blaster Pro (Panasonic) [ /dev/sbpcd ]" 2> /tmp/cdtype
if [ $? = 1 -o $? = 255 ]; then
rm -f /tmp/cdtype
exit
fi
CD_ROM_TYPE="`cat /tmp/cdtype`"
rm -f /tmp/cdtype
if [ "$CD_ROM_TYPE" = "1" ]; then
dialog --title "SELECT SCSI DEVICE" --menu "\
\n\
Which SCSI CD-ROM are you using? (If you're not sure, \n\
select /dev/sr0)" 14 60 4 \
"/dev/sr0" "SCSI cd 0" \
"/dev/sr1" "SCSI cd 1" \
"/dev/scd0" "SCSI cd 0 (might not work)" \
"/dev/scd1" "SCSI cd 1 (might not work) " 2> /tmp/whichscsi
if [ $? = 1 -o $? = 255 ]; then
rm -f /tmp/tmpmsg /tmp/cdtype /tmp/whichscsi
exit
fi
CD_DEVICE="`cat /tmp/whichscsi`"
rm -f /tmp/whichscsi
elif [ "$CD_ROM_TYPE" = "2" ]; then
CD_DEVICE="/dev/cdu31a"
elif [ "$CD_ROM_TYPE" = "3" ]; then
CD_DEVICE="/dev/sonycd"
elif [ "$CD_ROM_TYPE" = "4" ]; then
CD_DEVICE="/dev/mcd"
elif [ "$CD_ROM_TYPE" = "5" ]; then
CD_DEVICE="/dev/sbpcd"
fi
( cd $T_PX/dev ; ln -sf $CD_DEVICE cdrom )
else
T_PX=$1
if [ -r /tmp/SeTCDdev ]; then
( cd $T_PX/dev ; ln -sf `cat /tmp/SeTCDdev` cdrom )
exit
fi
while [ 0 ]; do
echo
echo -n "Do you have a CD-ROM ([y]es, [n]o)? "
read REPLY;
if [ "$REPLY" = "y" ]; then
break;
elif [ "$REPLY" = "n" ]; then
exit;
fi
done
echo
rm -f /tmp/SeTmount /tmp/SeTDS /tmp/SeTCDdev
while [ 0 ]; do
echo "Configuring CD-ROM link (/dev/cdrom)."
echo
echo "What type of CD-ROM drive do you have?"
echo "1 - SCSI [ /dev/sr0, /dev/sr1, /dev/scd0, or /dev/scd1 ]"
echo "2 - Sony CDU31A [ /dev/cdu31a ]"
echo "3 - Sony 535 [ /dev/sonycd ]"
echo "4 - Mitsumi [ /dev/mcd ]"
echo "5 - Sound Blaster Pro (Panasonic) [ /dev/sbpcd ]"
echo -n "Enter the number that matches your CD type: "
read CD_ROM_TYPE;
echo
if [ "$CD_ROM_TYPE" = "1" -o "$CD_ROM_TYPE" = "2" -o \
"$CD_ROM_TYPE" = "3" -o "$CD_ROM_TYPE" = "4" -o \
"$CD_ROM_TYPE" = "5" ]; then
break;
fi
done
if [ "$CD_ROM_TYPE" = "1" ]; then
while [ 0 ]; do
echo "Which SCSI CD-ROM are you using? /dev/sr0 is a good guess if you aren't sure."
echo "0 - /dev/sr0 (SCSI cd 0)"
echo "1 - /dev/sr1 (SCSI cd 1)"
echo "Which one (0/1)? "
read CD_DEVICE;
echo
if [ "$CD_DEVICE" = "0" -o "$CD_DEVICE" = "1" ]; then
break;
fi
done
if [ "$CD_DEVICE" = "0" ]; then
CD_DEVICE="/dev/sr0"
else
CD_DEVICE="/dev/sr1"
fi
elif [ "$CD_ROM_TYPE" = "2" ]; then
CD_DEVICE="/dev/cdu31a"
elif [ "$CD_ROM_TYPE" = "3" ]; then
CD_DEVICE="/dev/sonycd"
elif [ "$CD_ROM_TYPE" = "4" ]; then
CD_DEVICE="/dev/mcd"
elif [ "$CD_ROM_TYPE" = "5" ]; then
CD_DEVICE="/dev/sbpcd"
fi
( cd $T_PX/dev ; ln -sf $CD_DEVICE cdrom )
fi